package com.imagecollector.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Author: wrf
 * @Date: 2024/7/30 16:56
 * @Description:
 */
@Data
public class TaskAddDTO {

    @ApiModelProperty(value = "地区id")
    private Integer districtId;

    @ApiModelProperty(value = "任务标题")
    @NotBlank(message = "任务标题不能为空")
    private String title;

    @ApiModelProperty(value = "任务描述")
    @NotBlank(message = "任务描述不能为空")
    private String describe;

    @ApiModelProperty(value = "图片数量（至少几张）")
    @NotNull(message = "图片数量不能为空")
    @Min(value = 1, message = "至少一张选择一张图片")
    private Integer picNum;

    @ApiModelProperty(value = "任务完成奖金金额")
    @NotNull(message = "任务完成奖金金额不能为空")
    private BigDecimal reward;

    @ApiModelProperty(value = "特别要求")
    @NotBlank(message = "特别要求不能为空")
    private String requirement;

    @ApiModelProperty(value = "截止时间")
    @NotNull(message = "截止时间不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadline;

    @ApiModelProperty(value = "是否允许多人接取 0否 1是")
    @NotNull(message = "是否允许多人接取不能为空")
    private Integer isRepeatedlyReceive;

}
